package jsyf.oa.entity.device;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * Created by 92852 on 2018/4/25.
 */
@Entity
@Table(name = "T_DVC_REPAYMENT_PLAN", schema = "oa", catalog = "")
public class DeviceRepaymentPlanEntity extends BaseEntity {

private String sampleId;
private String expirationDate;//到期日期
private BigDecimal expirationMoney;//到期金额
private String paymentType;//款项类型
private String payee;//收款方
private String payeeAccount;//收款账户
private String accountName;
private String paymentMoney;//付款金额;
private String paymentDate;//付款日期
private String repaymentCertificateAttachName;
private String repaymentCertificateAttachUrl;
private String remark;
public String getSampleId() {
        return sampleId;
    }
public void setSampleId(String sampleId) {
        this.sampleId = sampleId;
    }
public String getExpirationDate() {
        return expirationDate;
    }
public void setExpirationDate(String expirationDate) {
        this.expirationDate = expirationDate;
    }

    public BigDecimal getExpirationMoney() {
        return expirationMoney;
    }

    public void setExpirationMoney(BigDecimal expirationMoney) {
        this.expirationMoney = expirationMoney;
    }

    public String getPaymentType() {
        return paymentType;
    }

    public void setPaymentType(String paymentType) {
        this.paymentType = paymentType;
    }

    public String getPayee() {
        return payee;
    }

    public void setPayee(String payee) {
        this.payee = payee;
    }

    public String getPayeeAccount() {
        return payeeAccount;
    }

    public void setPayeeAccount(String payeeAccount) {
        this.payeeAccount = payeeAccount;
    }

    public String getPaymentMoney() {
        return paymentMoney;
    }

    public void setPaymentMoney(String paymentMoney) {
        this.paymentMoney = paymentMoney;
    }

    public String getPaymentDate() {
        return paymentDate;
    }

    public void setPaymentDate(String paymentDate) {
        this.paymentDate = paymentDate;
    }

    public String getRepaymentCertificateAttachName() {
        return repaymentCertificateAttachName;
    }

    public void setRepaymentCertificateAttachName(String repaymentCertificateAttachName) {
        this.repaymentCertificateAttachName = repaymentCertificateAttachName;
    }

    public String getRepaymentCertificateAttachUrl() {
        return repaymentCertificateAttachUrl;
    }

    public void setRepaymentCertificateAttachUrl(String repaymentCertificateAttachUrl) {
        this.repaymentCertificateAttachUrl = repaymentCertificateAttachUrl;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", this.getId());
        obj.put("EXPIRATION_DATE", this.getExpirationDate());
        obj.put("EXPIRATION_MONEY", this.getExpirationMoney());
        obj.put("PAYMENT_TYPE", this.getPaymentType());
        obj.put("PAYEE", this.getPayee());
        obj.put("PAYEE_ACCOUNT", this.getPayeeAccount());
        obj.put("PAYMENT_MONEY", this.getPaymentMoney());
        obj.put("PAYMENT_DATE", this.getPaymentDate());
        obj.put("REPAYMENT_CERTIFICATE_ATTACH_NAME", this.getRepaymentCertificateAttachName());
        obj.put("REPAYMENT_CERTIFICATE_ATTACH_URL", this.getRepaymentCertificateAttachUrl());
        obj.put("SAMPLE_ID", this.getSampleId());
        obj.put("ACCOUNT_NAME", this.getAccountName());
        obj.put("UPDATE_USER_ID", getUpdateUserId());
        obj.put("UPDATE_TIME", getUpdateTime());
        obj.put("REMARK", getRemark());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_DVC_REPAYMENT_PLAN";
    }
    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("EXPIRATION_DATE", "expirationDate");
        obj.put("EXPIRATION_MONEY", "expirationMoney");
        obj.put("PAYMENT_TYPE","paymentType");
        obj.put("PAYEE", "payee");
        obj.put("PAYEE_ACCOUNT", "payeeAccount");
        obj.put("PAYMENT_MONEY", "paymentMoney");
        obj.put("PAYMENT_DATE", "paymentDate");
        obj.put("REPAYMENT_CERTIFICATE_ATTACH_NAME","repaymentCertificateAttachName");
        obj.put("REPAYMENT_CERTIFICATE_ATTACH_URL","repaymentCertificateAttachUrl");
        obj.put("SAMPLE_ID","sampleId");
        obj.put("ACCOUNT_NAME", "accountName");
        obj.put("UPDATE_USER_ID", "updateUserId");
        obj.put("UPDATE_TIME", "updateTime");
        obj.put("REMARK", "remark");
        return obj;
    }






}
